<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('设备')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-equipment_id" class="form-control selectpicker" name="row[equipment_id]" data-rule="required">
                <option value="">请选择设备</option>
                {volist name="equipmentList" id="equipment"}
                <option value="{$equipment.id}" {if $row.equipment_id == $equipment.id}selected{/if}>{$equipment.equipment_name}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('能源类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-energy_type" class="form-control selectpicker" name="row[energy_type]" data-rule="required">
                <option value="electricity" {if $row.energy_type == 'electricity'}selected{/if}>电力</option>
                <option value="water" {if $row.energy_type == 'water'}selected{/if}>水</option>
                <option value="gas" {if $row.energy_type == 'gas'}selected{/if}>天然气</option>
                <option value="other" {if $row.energy_type == 'other'}selected{/if}>其他</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('消耗量')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-consumption_amount" class="form-control" name="row[consumption_amount]" type="number" step="0.001" value="{$row.consumption_amount|default='0.000'}" data-rule="required;number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('单价')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit_price" class="form-control" name="row[unit_price]" type="number" step="0.01" value="{$row.unit_price|default='0.00'}" data-rule="required;number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('消耗日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-consumption_date" class="form-control" name="row[consumption_date]" type="date" value="{$row.consumption_date|default=''}" data-rule="required">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
